package com.zkthink.ceres.applet.order.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**

@Author cmz
@Date 2024-04-30 9:32
*/
@Data
@TableName(value = "applet_server_order")
public class AppletServerOrder {
    /**
     * 服务订单表主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 用户id
     */
    @TableField(value = "mid")
    private Long mid;

    /**
     * 服务id
     */
    @TableField(value = "server_id")
    private Long serverId;

    /**
     * 支付方式:1-微信支付 2-余额支付
     */
    @TableField(value = "pay_channel")
    private Integer payChannel;

    /**
     * 支付状态:1.未支付 2.已支付 3.已取消
     */
    @TableField(value = "pay_status")
    private Integer payStatus;

    /**
     * 付款时间
     */
    @TableField(value = "pay_time")
    private Date payTime;

    /**
     * 服务方式:1.上门、2.到店)
     */
    @TableField(value = "server_channel")
    private Integer serverChannel;

    /**
     * 店铺id
     */
    @TableField(value = "store_id")
    private Long storeId;

    /**
     * 上门的理疗车id
     */
    @TableField(value = "vehicles_id")
    private Long vehiclesId;

//    private String storeName;
//
//    private String licensePlate;

    /**
     * 上门所选的用户地址信息id
     */
    @TableField(value = "address_id")
    private Long addressId;

    /**
     * 用户选择预约上门和到店的时间
     */
    @TableField(value = "booking_time")
    private Date bookingTime;

    /**
     * 服务状态：1.待选择 2.待确认 3.待服务 4.进行中 5.已完成 6.已签字 7.已评论
     */
    @TableField(value = "server_status")
    private Integer serverStatus;

    /**
     * 订单码(核销用)
     */
    @TableField(value = "order_code")
    private String orderCode;

    /**
     * 支付单号
     */
    @TableField(value = "pay_num")
    private String payNum;

    /**
     * 二维码
     */
    @TableField(value = "code_url")
    private String codeUrl;

    /**
     * 备注
     */
    @TableField(value = "order_ramark")
    private String orderRamark;

    /**
     * 当前订单支付的总金额
     */
    @TableField(value = "costs")
    private BigDecimal costs;

    

    /**
     * 支付金额
     */
    @TableField(value = "pay_sum")
    private BigDecimal paySum;

    /**
     * 支付金额
     */
    @TableField(value = "coupons")
    private BigDecimal coupons;

    /**
     * 身体状况
     */
    @TableField(value = "body_status")
    private String bodyStatus;

    /**
     * 下次建议服务id
     */
    @TableField(value = "advise_server_id")
    private Long adviseServerId;

    /**
     * 下次建议服务时间
     */
    @TableField(value = "advice_time")
    private Date adviceTime;
    /**
     * 创建人
     */
    @TableField(value = "create_user")
    private String createUser;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 最后修改人
     */
    @TableField(value = "update_user")
    private String updateUser;

    /**
     * 最后修改时间
     */
    @TableField(value = "update_time")
    private Date updateTime;

    /**
     * 逻辑删除 1-删除 0-未删除
     */
    @TableField(value = "is_delete")
    @TableLogic(value = "0",delval = "1")
    private Integer isDelete;

    /**
     * 预支付id
     */
    @TableField(value = "prepay_id")
    private String prepayId;

    /**
     * 用户签名
     */
    @TableField(value = "autograph")
    private String autograph;

    /**
     * 核销时间
     */
    @TableField(value = "shiyong_time")
    private Date shiyongTime;

    @TableField(value = "cut_amount")
    private BigDecimal cutAmount;
    
    

    public static final String PREPAY_ID = "prepay_id";
    
    public static final String COL_ID = "id";

    public static final String COL_MID = "mid";

    public static final String COL_SERVER_ID = "server_id";

    public static final String COL_PAY_CHANNEL = "pay_channel";

    public static final String COL_PAY_STATUS = "pay_status";

    public static final String COL_PAY_TIME = "pay_time";

    public static final String COL_SERVER_CHANNEL = "server_channel";

    public static final String COL_STORE_ID = "store_id";

    public static final String COL_VEHICLES_ID = "vehicles_id";

    public static final String COL_ADDRESS_ID = "address_id";

    public static final String COL_BOOKING_TIME = "booking_time";

    public static final String COL_SERVER_STATUS = "server_status";

    public static final String COL_ORDER_CODE = "order_code";

    public static final String COL_ORDER_RAMARK = "order_ramark";

    public static final String COL_COSTS = "costs";

    public static final String COL_BODY_STATUS = "body_status";

    public static final String COL_CREATE_USER = "create_user";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_UPDATE_USER = "update_user";

    public static final String COL_UPDATE_TIME = "update_time";

    public static final String COL_IS_DELETE = "is_delete";
}